using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

public class Game : MonoBehaviour
{
    [SerializeField] private StartLayer StartNode;
    [SerializeField] private GameLayer GameNode;

    private void Awake()
    {
        transform.localScale = Vector3.one * Convert.ToSingle(Screen.width)/750.0f;
    }

    private void Start()
    {
        StartNode.Show();
        GameNode.gameObject.SetActive(false);
    }

    public void OnPlayClick() {
        StartNode.gameObject.SetActive(false);
        GameNode.gameObject.SetActive(true);
        GameNode.StartGame();
    }

    public void OnHomeClick() {
        StartNode.Show();
        GameNode.gameObject.SetActive(false);
    }

    public void OnRestartClick()
    {
        OnPlayClick();
    }
}
